package com.ysd.lis.controller.callNum;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.callNum.CallSampleType;
import com.ysd.lis.service.callNum.CallSampleTypeService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author wh
 * @since 2025-05-28
 */
@RestController
@RequestMapping("/callNum/sampleType")
public class CallSampleTypeController extends BaseController {

    @Autowired
    private CallSampleTypeService callSampleTypeService;

    @ApiOperation("获取采样类型列表")
    @GetMapping("/findSampleTypeList")
    public Result findSampleTypeList(@RequestParam("seachValue") String seachValue) {
        return callSampleTypeService.findSampleTypeList(seachValue);
    }

    @ApiOperation("新增或修改")
    @PostMapping("/saveOrUpdateSampleType")
    public Result saveOrUpdateSampleType(@RequestBody List<CallSampleType> callSampleTypes) {
        return callSampleTypeService.saveOrUpdateSampleType(callSampleTypes);
    }

    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteSampleType")
    public Result batchDeleteSampleType(@RequestBody List<CallSampleType> callSampleTypes) {
        return callSampleTypeService.batchDeleteSampleType(callSampleTypes);
    }

}
